#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright @ 2014 OPS, Qunar Inc. (qunar.com)
#
# Author: tingfang.bao <tingfang.bao@qunar.com>
# DateTime: 15-3-6 下午4:59
from flask import Flask

# 主要注意一点instance_path必须是绝对路径
app = Flask(__name__, instance_path='/etc/skyfree', instance_relative_config=True)

app.config.from_pyfile("my.cnf", silent=True)

print app.config['DATABASE']

with app.open_instance_resource('info') as f:
    print f.read()

